home *** CD-ROM | disk | FTP | other *** search
- scenario = GetProperties()
- scenario.ScenarioType = 1
- scenario.Title = "sc_Train_08_00"
- scenario.Map = "Beotorum.dat"
- scenario.Description = "sc_Train_08_01"
- scenario.Picture = "Train 08.dds"
- scenario.iSortOrder = 8
-
- scenario.vShowMessageBoxes[STDDT_GUERILLA] = false
- scenario.vShowMessageBoxes[STDDT_COMBAT_PHASE] = false
- scenario.vShowMessageBoxes[STDDT_SHOW_REVENUE] = false
- scenario.vShowMessageBoxes[STDDT_AUTOFINISH_GUERILLA] = false
- scenario.vShowMessageBoxes[STDDT_AUTOFINISH_COMBAT] = false
- scenario.vShowMessageBoxes[STDDT_AUTOFINISH_REVENUE] = false
- scenario.vShowMessageBoxes[STDDT_YOU_CAPTURED_CAPITAL] = false
- scenario.vShowMessageBoxes[STDDT_YOU_CLEARED_TERRITORY] = false
- scenario.vShowMessageBoxes[STDDT_YOU_CAPTURED_COUNTRY] = false
- scenario.vShowMessageBoxes[STDDT_ENEMY_CLEARED_TERRITORY] = false
- scenario.vShowMessageBoxes[STDDT_ENEMY_INVADED] = false
- scenario.vShowMessageBoxes[STDDT_ENEMY_CAPTURED_COUNTRY] = false
- scenario.vShowMessageBoxes[STDDT_INVADE_COUNTRY] = false
-
- Player(PT_PLAYER, RACE_HUMANS)
- Player(PT_AI, RACE_ALIENS)
-
- --SetInitialCamera(-0.739249, 0.000000, -0.673431, 0.000000, 0.662946, 0.175779, -0.727739, 0.000000,0.118375, -0.984429, -0.129945, 0.000000,1199.751465, 548.634888, -809.019043, 1.000000)
- SetInitialCamera(-0.627260, 0.000000, 0.778810, 0.000000, -0.443819, 0.821736, -0.357455, 0.000000,-0.639976, -0.569868, -0.515443, 0.000000,1938.187378, 414.941132, -72.365982, 1.000000)
- function InitialMOB()
- StartMOB(1)
-
- SetupUnit( 4098, NTRANSP, 1, 9 )
- SetupUnit( 4099, HBOT, 1, 9 )
- SetupUnit( 4100, HBOT, 1, 9 )
-
- ShowXBallon(4, -1, MBS_CENTER, 455, 405, "sc_Train_08_02")
- ShowXBallon(4, -1, MBS_CENTER, 455, 405,"sc_Train_08_03")
- ShowXBallon(4, -1, MBS_CENTER, 455, 405, "sc_Train_08_04")
- InitCameraPointsList()
- AddCameraPoint(-0.892210, 0.000000, 0.451620, 0.000000, -0.371274, 0.569354, -0.733479, 0.000000,-0.257132, -0.822093, -0.507983, 0.000000,1049.038330, 392.638672, -497.366913, 1.000000)
- AddCameraPoint(-0.689769, 0.000000, -0.724030, 0.000000, 0.389692, 0.842800, -0.371252, 0.000000,0.610213, -0.538226, -0.581337, 0.000000,1174.002563, 196.914566, -791.180054, 1.000000)
- FlyCameraByPoints(1.0)
- Disclose( 4 )
-
- ShowXBallon(4, -1, MBS_CENTER, 599, 381, "sc_Train_08_05")
-
- SetupUnit(1, AMPHIBIAA, 19, 25)
- pause(0.8)
- SetupUnit(2, AMPHIBIAA, 20, 24)
- pause(0.8)
- SetupUnit(3, TANKA, 21, 23)
-
- ShowXBallon(4, -1, MBS_CENTER, 430, 415,"sc_Train_08_06")
- FlyCamera(-0.681473, 0.000000, -0.731843, 0.000000, 0.694459, 0.315524, -0.646662, 0.000000,0.230914, -0.948918, -0.215021, 0.000000,1019.963379, 376.320465, -810.591431, 1.000000)
- ShowObject(ARROW, 1, 16711680, 100, 50, 19, 23, 17, 21)
- ShowXBallon(4, -1, MBS_CENTER, 698, 635, "sc_Train_08_07")
-
- HideObject(1)
- ShowXBallon(4, -1, MBS_CENTER, 698, 635, "sc_Train_08_08")
-
-
- --FlyCamera(-0.603659, 0.000000, -0.797243, 0.000000, 0.784827, 0.175794, -0.594258, 0.000000,0.140150, -0.984427, -0.106120, 0.000000,67.101639, 548.634888, -488.771393, 1.000000)
- FlyCamera(-0.823319, -0.000000, -0.567579, 0.000000, 0.473305, 0.551914, -0.686566, 0.000000,0.313255, -0.833901, -0.454401, 0.000000,36.259396, 163.291489, -269.244568, 1.000000)
-
- ShowXBallon(4, -1, MBS_LEFT, 522, 480,"sc_Train_08_09")
- SetCamera(-0.469045, 0.000000, -0.883174, 0.000000, 0.820617, 0.369658, -0.435822, 0.000000,0.326472, -0.929168, -0.173386, 0.000000,-71.434784, 524.918335, -474.589264, 1.000000)
- ShowObject(ARROW, 2, 65280, 100, 70, 0, 10, 0, 16)
- ShowObject(ARROW, 3, 65280, 100, 70, 0, 16, 5, 21)
- pause(2.0)
- HideObject(2)
- HideObject(3)
- FinishMOB()
- end
-
- old_prompt = ""
-
- local bCanEndPhase = false
-
- function OnUpdate()
- bCanEndPhase = false
-
- if GetTurnNumber(COLOR_GREEN) == 0 then
- if GetGamePhase() == PHASE_DEPLOYMENT then
- if GetSelectedCountry() ~= 5 and GetMoney(5, MONEY_BANK) > 0 then
- ShowPrompting("sc_Train_08_10")
- elseif GetMoney(5, MONEY_BANK) > 0 then
- ShowPrompting("sc_Train_08_11")
- end
- end
- elseif GetTurnNumber(COLOR_GREEN) == 1 then
- if GetGamePhase() == PHASE_GUERRILLA then
- if GetMoney(5, MONEY_GUERRILLA) > 0 then
- ShowPrompting("sc_Train_08_12")
- end
- elseif GetGamePhase() == PHASE_COMBAT then
- if IsAlive( 1 ) then
- ShowPrompting("sc_Train_08_13")
- elseif GetHP( 2 ) == 4 then
- ShowPrompting("sc_Train_08_14")
- end
- end
- elseif GetTurnNumber(COLOR_GREEN) == 2 then
- if GetMP( 4098 ) > 0 then
- ShowPrompting("sc_Train_08_15")
- elseif IsInside( 4099 ) or IsInside( 4100 ) then
- ShowPrompting("sc_Train_08_16")
- elseif IsAlive( 2 ) then
- ShowPrompting("sc_Train_08_17")
- elseif IsHexFull( 20, 22 ) == 0 then
- ShowPrompting("sc_Train_08_18")
- elseif IsHexFull( 19, 23 ) == 0 then
- ShowPrompting("sc_Train_08_19")
- elseif IsHexFull( 18, 22 ) == 0 then
- ShowPrompting("sc_Train_08_20")
- else
- for id = 4101, 4106 do
- if IsAlive( id ) and not HasFired( id ) then
- ShowPrompting("sc_Train_08_21")
- break
- end
- end
- end
- elseif GetTurnNumber(COLOR_GREEN) == 3 then
- if GetGamePhase() == PHASE_COMBAT then
- if GetCountryControl( 5 ) ~= COLOR_GREEN then
- ShowPrompting("sc_Train_08_22")
- end
- elseif GetGamePhase() == PHASE_DEPLOYMENT then
- if GetMoney(5, MONEY_BANK) > 0 then
- ShowPrompting("sc_Train_08_23")
- end
- end
- end
-
- if not HasPrompting() then
- if GetGamePhase() == PHASE_COMBAT and GetMP( 4098 ) > 0 then
- ShowPrompting("sc_Train_08_24")
- else
- ShowPrompting("sc_Train_finish_phase")
- bCanEndPhase = true
- end
- end
- end
-
- local bEqualFinalTanks = false
-
- function OnHexClicked(x, y, clicked_unit, selected_unit, command)
-
- if command == CMD_SELECT_COUNTRY and clicked_unit == 5 then
- if GetTurnNumber( COLOR_GREEN ) == 0 and GetGamePhase() == PHASE_DEPLOYMENT then
- StartMOB(3)
- ShowXBallon(51, -1, MBS_RIGHT, 756, 421, "sc_Train_08_26")
- ShowXBallon(51, -1, MBS_CENTER, 335, 400, "sc_Train_08_27")
- ShowXBallon(51, -1, MBS_CENTER, 335, 400, "sc_Train_08_28")
- ShowXBallon(51, -1, MBS_CENTER, 335, 400, "sc_Train_08_29")
- ShowXBallon(51, -1, MBS_CENTER, 335, 400, "sc_Train_08_30")
- ShowXBallon(51, -1, MBS_CENTER, 335, 430, "sc_Train_08_31")
- FinishMOB()
- end
- end
-
- if command == CMD_SETUP and GetType(selected_unit) ~= LBOT then
- IncorrectAction("sc_Train_08_32")
- return
- end
-
- if command == CMD_MOVE then
- if GetCountry( x, y ) == 4 then
- IncorrectAction("sc_Train_08_33")
- return
- end
- end
-
- if GetTurnNumber(COLOR_GREEN) == 0 then
- if command == CMD_MOVE then
- if selected_unit == 4098 then
- if x ~= 2 or y ~= 18 then
- IncorrectAction("sc_Train_08_34")
- end
- end
- elseif command == CMD_SETUP then
- if not ( x == 20 and y == 22 or x == 19 and y == 23 ) then
- IncorrectAction("sc_Train_08_35")
- end
- end
- elseif GetTurnNumber(COLOR_GREEN) == 1 then
- if command == CMD_SETUP then
- if not ( x == 19 and y == 23 or x == 18 and y == 22 or x == 18 and y == 20 or x == 17 and y == 23 ) then
- IncorrectAction("sc_Train_08_35")
- end
- elseif command == CMD_MOVE then
- if GetType( selected_unit ) == LBOT then
- IncorrectAction("sc_Train_08_37")
- elseif selected_unit == 4098 then
- if x ~= 8 or y ~= 20 then
- IncorrectAction("sc_Train_08_34")
- end
- end
- elseif command == CMD_FIRE then
- if GetDistance(1, selected_unit) == 1 and clicked_unit ~= 1 then
- IncorrectAction("sc_Train_08_39")
- end
- end
- elseif GetTurnNumber(COLOR_GREEN) == 2 then
- if command == CMD_SELECT then
- if GetType( clicked_unit ) == LBOT and IsAlive( 2 ) then
- if IsInside( 4099 ) or IsInside( 4100 ) then
- StartMOB(1)
- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_08_40")
- FinishMOB()
- else
- StartMOB(1)
- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_08_41")
- FinishMOB()
- end
- end
- elseif command == CMD_FIRE then
- if GetType( selected_unit ) == LBOT then
- if GetMP( selected_unit ) == 10 then
- IncorrectAction("sc_Train_08_42")
- elseif clicked_unit == 4 then
- local p = GetPos( selected_unit )
- if p.x == 19 and p.y == 23 then
- IncorrectAction("sc_Train_08_43")
- end
- end
- end
- elseif command == CMD_MOVE then
- if selected_unit == 4098 then
- if x ~= 14 or y ~= 22 then
- IncorrectAction("sc_Train_08_44")
- end
- elseif GetType( selected_unit ) == LBOT then
- if IsHexFull( 20, 22 ) == 0 then
- if x ~= 20 or y ~= 22 then
- IncorrectAction("sc_Train_08_35")
- end
- elseif IsHexFull( 19, 23 ) == 0 then
- if x ~= 19 or y ~= 23 then
- IncorrectAction("sc_Train_08_35")
- end
- elseif IsHexFull( 18, 22 ) == 0 then
- if x ~= 18 or y ~= 22 then
- IncorrectAction("sc_Train_08_35")
- end
- end
- end
- end
- elseif GetTurnNumber(COLOR_GREEN) == 3 then
- if command == CMD_FIRE then
- local p = GetPos( clicked_unit )
- if GetCountry( p.x, p.y ) ~= 5 then
- IncorrectAction("sc_Train_08_48")
- return
- elseif GetType( selected_unit ) == HBOT and GetHP( clicked_unit ) < 3 then
- IncorrectAction("sc_Train_08_49")
- return
- end
- elseif command == CMD_MOVE then
- local p = GetPos( selected_unit )
- if p.x + p.y == 42 and x + y ~= 42 then
- IncorrectAction("sc_Train_08_50")
- return
- elseif p.x == 15 and p.y == 21 then
- if x ~= 17 or y ~= 21 then
- IncorrectAction("sc_Train_08_35")
- return
- end
- elseif p.x == 15 and p.y == 23 then
- if x ~= 16 or y ~= 24 then
- IncorrectAction("sc_Train_08_35")
- return
- end
- end
- end
-
- local p = GetPos( selected_unit )
-
- if bEqualFinalTanks then
- if command == CMD_FIRE then
- if GetType( selected_unit ) == LBOT and p.x + p.y < 42 then
- if clicked_unit ~= 3 then
- IncorrectAction("sc_Train_08_49")
- end
- elseif ( p.x == 15 and p.y == 23 ) or ( p.x == 16 and p.y == 24 ) then
- if IsHexFull( 17, 23 ) == 0 and GetType( IsHexFull( 17, 21 ) ) ~= HBOT and clicked_unit ~= 5 then
- IncorrectAction("sc_Train_08_49")
- end
- end
- elseif command == CMD_MOVE then
- if GetType( selected_unit ) == LBOT and p.x + p.y < 42 then
- if GetDistance( 3, x, y ) > 1 then
- IncorrectAction("sc_Train_08_49")
- end
- end
- end
- else
- if command == CMD_MOVE then
- if p.x == 18 and p.y == 22 then
- IncorrectAction("sc_Train_08_35")
- end
- end
- end
-
- if command == CMD_SETUP then
- if x + y ~= 42 then
- IncorrectAction("sc_Train_08_35")
- end
- end
- end
- end
-
- function OnBeginPhase(phase)
- if GetTurnNumber( COLOR_GREEN ) == 0 and phase == PHASE_DEPLOYMENT then
- StartMOB(1)
- FlyCamera(-0.576080, -0.000000, -0.817393, 0.000000, 0.808513, 0.147006, -0.569821, 0.000000,0.120161, -0.989135, -0.084687, 0.000000,1119.200439, 468.516541, -778.856018, 1.000000)
- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_08_51")
- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_08_52")
- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_08_53")
- FinishMOB()
- elseif GetTurnNumber( COLOR_GREEN ) == 1 then
- if phase == PHASE_GUERRILLA then
- StartMOB(1)
- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_08_54")
- -- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_08_55")
- ShowXBallon(51, -1, MBS_CENTER, 342, 548, "sc_Train_08_55")
- FlyCamera(-0.636797, -0.000000, -0.771031, 0.000000, 0.769098, 0.070762, -0.635201, 0.000000,0.054559, -0.997493, -0.045060, 0.000000,1195.325317, 372.394836, -774.063049, 1.000000)
- -- FlyCamera(-0.636797, -0.000000, -0.771031, 0.000000, 0.769098, 0.070762, -0.635201, 0.000000,0.054559, -0.997493, -0.045060, 0.000000,1195.325317, 372.394836, -774.063049, 1.000000)
- -- FlyCamera(-0.636797, -0.000000, -0.771031, 0.000000, 0.769098, 0.070762, -0.635201, 0.000000,0.054559, -0.997493, -0.045060, 0.000000,1195.325317, 372.394836, -774.063049, 1.000000)
- ShowXBallon(51, -1, MBS_RIGHT, 537, 361, "sc_Train_08_56")
- -- FlyCamera(-0.636797, 0.000000, -0.771031, 0.000000, 0.769098, 0.070761, -0.635201, 0.000000,0.054559, -0.997493, -0.045060, 0.000000,1167.451660, 468.516541, -750.093201, 1.000000)
- FlyCamera(-0.785841, 0.000000, -0.618428, 0.000000, 0.616879, 0.070738, -0.783872, 0.000000,0.043746, -0.997495, -0.055588, 0.000000,1184.111450, 333.194489, -740.528198, 1.000000)
- ShowXBallon(51, -1, MBS_LEFT, 506, 393, "sc_Train_08_57")
- -- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_08_57")
- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_08_58")
- FinishMOB()
- elseif phase == PHASE_COMBAT then
- StartMOB(1)
- -- FlyCamera(-0.785841, 0.000000, -0.618428, 0.000000, 0.616879, 0.070738, -0.783872, 0.000000,0.043746, -0.997495, -0.055588, 0.000000,1184.111450, 333.194489, -740.528198, 1.000000)
- -- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_08_59")
- FlyCamera(-0.785841, 0.000000, -0.618428, 0.000000, 0.616879, 0.070738, -0.783872, 0.000000,0.043746, -0.997495, -0.055588, 0.000000,1184.111450, 333.194489, -740.528198, 1.000000)
- ShowXBallon(51, -1, MBS_LEFT, 506, 393, "sc_Train_08_59")
- FinishMOB()
- end
- elseif GetTurnNumber( COLOR_GREEN ) == 2 then
- if phase == PHASE_COMBAT then
- StartMOB(1)
- -- FlyCamera(-0.682476, 0.000000, -0.730908, 0.000000, 0.717182, 0.192890, -0.669660, 0.000000,0.140985, -0.981220, -0.131643, 0.000000,650.349792, 444.205231, -706.140564, 1.000000)
- FlyCamera(-0.682476, 0.000000, -0.730908, 0.000000, 0.717182, 0.192890, -0.669660, 0.000000,0.140985, -0.981220, -0.131643, 0.000000,650.349792, 444.205231, -706.140564, 1.000000)
- FinishMOB()
- end
- elseif GetTurnNumber( COLOR_GREEN ) == 3 then
- if phase == PHASE_COMBAT then
- StartMOB(1)
- FlyCamera(-0.565817, 0.000000, -0.824531, 0.000000, 0.782304, 0.315918, -0.536839, 0.000000,0.260484, -0.948786, -0.178752, 0.000000,880.344727, 329.312653, -831.693237, 1.000000)
- SelectUnit(3)
- SelectUnit(5)
- SelectUnit(4099)
- SelectUnit(4100)
- SelectUnit(4105)
- ShowXBallon(51, -1, MBS_CENTER, 693, 416, "sc_Train_08_60")
- UnselectUnit(3)
- UnselectUnit(5)
- UnselectUnit(4099)
- UnselectUnit(4100)
- UnselectUnit(4105)
-
- if GetHP( 3 ) == GetHP( 5 ) then
- bEqualFinalTanks = true
- else
- bEqualFinalTanks = false
- end
-
- FinishMOB()
- end
- elseif GetCountryControl( 5 ) == COLOR_GREEN and phase == PHASE_DEPLOYMENT then
- StartMOB(1)
- FlyCamera(0.557139, 0.000000, -0.830419, 0.000000, 0.812109, 0.208833, 0.544855, 0.000000,0.173419, -0.977951, 0.116349, 0.000000,986.574280, 352.915955, -793.248901, 1.000000)
- -- FlyCamera(0.557139, 0.000000, -0.830419, 0.000000, 0.812109, 0.208833, 0.544855, 0.000000,0.173419, -0.977951, 0.116349, 0.000000,986.574280, 352.915955, -793.248901, 1.000000)
- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_08_61")
- -- FlyCamera(-0.870180, 0.000000, -0.492733, 0.000000, 0.478493, 0.238675, -0.845032, 0.000000,0.117603, -0.971099, -0.207690, 0.000000,1218.958130, 352.915955, -800.158997, 1.000000)
- FlyCamera(-0.870180, 0.000000, -0.492733, 0.000000, 0.478493, 0.238675, -0.845032, 0.000000,0.117603, -0.971099, -0.207690, 0.000000,1218.958130, 352.915955, -800.158997, 1.000000)
- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_08_62")
- FinishMOB()
- end
- end
-
- local bVictory = false
-
- function OnEndTurn()
- if GetTurnNumber( COLOR_GREEN ) == 0 then
- StartMOB(1)
- -- FlyCamera(0.778401, 0.000000, 0.627767, 0.000000, -0.571288, 0.414540, 0.708369, 0.000000,-0.260234, -0.910031, 0.322678, 0.000000,1297.226318, 368.439240, -940.557983, 1.000000)
- FlyCamera(0.778401, 0.000000, 0.627767, 0.000000, -0.571288, 0.414540, 0.708369, 0.000000,-0.260234, -0.910031, 0.322678, 0.000000,1297.226318, 368.439240, -940.557983, 1.000000)
- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_08_63")
- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_08_64")
- FinishMOB()
- elseif GetTurnNumber( COLOR_GREEN ) == 1 then
- StartMOB(1)
- FlyCamera(-0.725853, 0.000000, -0.687849, 0.000000, 0.683808, 0.108240, -0.721589, 0.000000,0.074453, -0.994125, -0.078567, 0.000000,1085.912231, 420.161469, -697.990784, 1.000000)
- -- FlyCamera(-0.725853, 0.000000, -0.687849, 0.000000, 0.683808, 0.108240, -0.721589, 0.000000,0.074453, -0.994125, -0.078567, 0.000000,1085.912231, 420.161469, -697.990784, 1.000000)
- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_08_65")
- FinishMOB()
- elseif GetCountryControl( 5 ) ~= COLOR_GREEN then
- StartMOB(1)
- -- FlyCamera(-0.725853, 0.000000, -0.687849, 0.000000, 0.683808, 0.108240, -0.721589, 0.000000,0.074453, -0.994125, -0.078567, 0.000000,1085.912231, 420.161469, -697.990784, 1.000000)
- FlyCamera(-0.725853, 0.000000, -0.687849, 0.000000, 0.683808, 0.108240, -0.721589, 0.000000,0.074453, -0.994125, -0.078567, 0.000000,1085.912231, 420.161469, -697.990784, 1.000000)
- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_08_66")
- FinishMOB()
- elseif IsHexFull(20, 22) > 0 and IsHexFull(19, 23) > 0 and IsHexFull(18, 24) > 0 then
- StartMOB(1)
- bVictory = true
- FlyCamera(-0.997166, -0.000000, 0.075230, 0.000000, -0.071749, 0.300650, -0.951032, 0.000000,-0.022618, -0.953734, -0.299798, 0.000000,1147.969604, 397.740173, -659.337524, 1.000000)
- -- FlyCamera(-0.997166, -0.000000, 0.075230, 0.000000, -0.071749, 0.300650, -0.951032, 0.000000,-0.022618, -0.953734, -0.299798, 0.000000,1147.969604, 397.740173, -659.337524, 1.000000)
- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_08_67")
- FinishMOB()
- end
- end
-
- function OnEndAITurn()
- if GetTurnNumber( COLOR_RED ) == 0 then
- StartMOB(1)
- FlyCamera(0.929103, 0.000000, 0.369820, 0.000000, -0.243303, 0.753109, 0.611254, 0.000000,-0.278515, -0.657896, 0.699716, 0.000000,1416.715942, 263.430267, -1048.033936, 1.000000)
- ShowXBallon(51, -1, MBS_LEFT, 383, 505, "sc_Train_08_68")
- FinishMOB()
- elseif GetTurnNumber( COLOR_RED ) == 1 then
- StartMOB(1)
- -- FlyCamera(0.924687, -0.000000, -0.380729, 0.000000, 0.371557, 0.218184, 0.902409, 0.000000,0.083069, -0.975908, 0.201751, 0.000000,1280.760376, 419.045532, -974.900085, 1.000000)
- FlyCamera(0.924687, -0.000000, -0.380729, 0.000000, 0.371557, 0.218184, 0.902409, 0.000000,0.083069, -0.975908, 0.201751, 0.000000,1280.760376, 419.045532, -974.900085, 1.000000)
- FlyCamera(0.914649, 0.000000, -0.404249, 0.000000, 0.368973, 0.408545, 0.834835, 0.000000,0.165154, -0.912738, 0.373676, 0.000000,1163.519653, 419.665009, -962.705139, 1.000000)
- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_08_69")
- FinishMOB()
- elseif GetTurnNumber( COLOR_RED ) == 2 then
- StartMOB(1)
- SetMP(4098, 0)
- FinishMOB()
- end
- end
-
- function OnCountryInvaded(country, color)
- if country == 5 then
- StartMOB(1)
- -- FlyCamera(0.746720, -0.000000, 0.665138, 0.000000, -0.640953, 0.267205, 0.719569, 0.000000,-0.177728, -0.963640, 0.199528, 0.000000,1411.109985, 331.871033, -927.953186, 1.000000)
- FlyCamera(-0.715551, 0.000000, -0.698560, 0.000000, 0.331726, 0.880055, -0.339794, 0.000000,0.614772, -0.474871, -0.629725, 0.000000,1035.700928, 187.793503, -721.002197, 1.000000)
- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_08_70")
- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_08_71")
- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_08_72")
- FinishMOB()
- end
- end
-
- function OnUnitDead(unit)
- if GetTurnNumber( COLOR_RED ) == 0 then
- StartMOB(1)
- -- FlyCamera(0.515332, -0.000000, 0.856990, 0.000000, -0.854843, 0.070751, 0.514041, 0.000000,-0.060632, -0.997494, 0.036460, 0.000000,1302.369019, 335.710144, -882.839355, 1.000000)
- FlyCamera(0.952639, 0.000000, -0.304103, 0.000000, 0.176944, 0.813292, 0.554298, 0.000000,0.247324, -0.581855, 0.774774, 0.000000,1189.479004, 246.053589, -1025.821533, 1.000000)
- ShowXBallon(51, -1, MBS_LEFT, 431, 646, "sc_Train_08_73")
- FinishMOB()
- elseif unit == 2 then
- if IsHexFull(18, 20) > 0 then
- StartMOB(1)
- -- FlyCamera(-0.725853, 0.000000, -0.687849, 0.000000, 0.683808, 0.108240, -0.721589, 0.000000,0.074453, -0.994125, -0.078566, 0.000000,1174.037598, 392.638672, -796.555786, 1.000000)
- FlyCamera(-0.725853, 0.000000, -0.687849, 0.000000, 0.683808, 0.108240, -0.721589, 0.000000,0.074453, -0.994125, -0.078566, 0.000000,1174.037598, 392.638672, -796.555786, 1.000000)
-
- ShowObject(ARROW, 7, 65280, 100, 20, 19, 23, 20, 22)
- ShowXBallon(51, -1, MBS_LEFT, 340, 363, "sc_Train_08_74")
- -- ShowXBallon(51, -1, MBS_CENTER, 300, 300,
- ShowXBallon(51, -1, MBS_LEFT, 523, 435, "sc_Train_08_75")
- ShowObject(ARROW, 8, 65280, 100, 20, 18, 22, 19, 23)
- ShowObject(ARROW, 8, 65280, 100, 20, 18, 20, 18, 22)
-
- ShowXBallon(51, -1, MBS_LEFT, 557, 621, "sc_Train_08_76")
- HideObject(7)
- HideObject(8)
- HideObject(9)
- FinishMOB()
- end
- end
- end
-
- function OnCountryCaptured(country, color)
- if(country == 5 and color == COLOR_GREEN) then
- StartMOB(1)
- ShowXBallon(51, -1, MBS_CENTER, 300, 300, "sc_Train_08_77")
- FinishMOB()
- end
- end
-
- function OnEndPhase( phase )
- if phase == PHASE_COMBAT then
- if not AllUnitsMovedAndFiredIfCould() then
- IncorrectAction("sc_Train_08_35")
- end
- elseif phase == PHASE_DEPLOYMENT then
- if GetCountryControl( 5 ) == COLOR_GREEN and GetMoney(5, MONEY_BANK) > 0 then
- IncorrectAction("sc_Train_08_35")
- end
- end
- end
-
- function CheckForVictory()
- if bVictory then return GAMERESULT_VICTORY end
- if GetAliveUnitsAmount(COLOR_GREEN) == 0 then return GAMERESULT_DEFEAT end
- return GAMERESULT_NONE
- end
-
- function aiDefence(country)
- aiMustNot()
- end
-
- function aiUnit(unit)
- if GetTurnNumber( COLOR_GREEN ) == 1 then
- if unit == 1 then
- aiHexAttraction( 19, 21, 15 )
- elseif unit == 2 then
- aiHexAttraction( 18, 24, 15 )
- elseif unit == 3 then
- aiHexAttraction( 19, 25, 15 )
- end
- else
- if unit == 4 then
- aiHexAttraction( 20, 24, 15 )
- else
- aiHexAttraction( 16, 22, 15 )
- end
- end
- end
-
- function aiMustBuyOnDeployment(country)
- if GetTurnNumber( COLOR_GREEN ) == 1 then
- aiMustBuy( TANKA, 20, 24 )
- else
- aiMustBuy( TANKA, 19, 25 )
- end
- end
-
- function InitialSetup()
- Country(5, ALLIANCE_FNU_ALLY)
- PlaceCapital(5, 16, 20)
-
- Country(4, ALLIANCE_FL_SECRET_ALLY)
-
- end
-